// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;

impl std::fmt::Debug for super::Span {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Span");
        debug_struct.field("name", &self.name);
        debug_struct.field("span_id", &self.span_id);
        debug_struct.field("parent_span_id", &self.parent_span_id);
        debug_struct.field("display_name", &self.display_name);
        debug_struct.field("start_time", &self.start_time);
        debug_struct.field("end_time", &self.end_time);
        debug_struct.field("attributes", &self.attributes);
        debug_struct.field("stack_trace", &self.stack_trace);
        debug_struct.field("time_events", &self.time_events);
        debug_struct.field("links", &self.links);
        debug_struct.field("status", &self.status);
        debug_struct.field(
            "same_process_as_parent_span",
            &self.same_process_as_parent_span,
        );
        debug_struct.field("child_span_count", &self.child_span_count);
        debug_struct.field("span_kind", &self.span_kind);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::span::Attributes {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Attributes");
        debug_struct.field("attribute_map", &self.attribute_map);
        debug_struct.field("dropped_attributes_count", &self.dropped_attributes_count);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::span::TimeEvent {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("TimeEvent");
        debug_struct.field("time", &self.time);
        debug_struct.field("value", &self.value);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::span::time_event::Annotation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Annotation");
        debug_struct.field("description", &self.description);
        debug_struct.field("attributes", &self.attributes);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::span::time_event::MessageEvent {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("MessageEvent");
        debug_struct.field("r#type", &self.r#type);
        debug_struct.field("id", &self.id);
        debug_struct.field("uncompressed_size_bytes", &self.uncompressed_size_bytes);
        debug_struct.field("compressed_size_bytes", &self.compressed_size_bytes);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::span::TimeEvents {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("TimeEvents");
        debug_struct.field("time_event", &self.time_event);
        debug_struct.field("dropped_annotations_count", &self.dropped_annotations_count);
        debug_struct.field(
            "dropped_message_events_count",
            &self.dropped_message_events_count,
        );
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::span::Link {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Link");
        debug_struct.field("trace_id", &self.trace_id);
        debug_struct.field("span_id", &self.span_id);
        debug_struct.field("r#type", &self.r#type);
        debug_struct.field("attributes", &self.attributes);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::span::Links {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Links");
        debug_struct.field("link", &self.link);
        debug_struct.field("dropped_links_count", &self.dropped_links_count);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::AttributeValue {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("AttributeValue");
        debug_struct.field("value", &self.value);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::StackTrace {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("StackTrace");
        debug_struct.field("stack_frames", &self.stack_frames);
        debug_struct.field("stack_trace_hash_id", &self.stack_trace_hash_id);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::stack_trace::StackFrame {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("StackFrame");
        debug_struct.field("function_name", &self.function_name);
        debug_struct.field("original_function_name", &self.original_function_name);
        debug_struct.field("file_name", &self.file_name);
        debug_struct.field("line_number", &self.line_number);
        debug_struct.field("column_number", &self.column_number);
        debug_struct.field("load_module", &self.load_module);
        debug_struct.field("source_version", &self.source_version);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::stack_trace::StackFrames {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("StackFrames");
        debug_struct.field("frame", &self.frame);
        debug_struct.field("dropped_frames_count", &self.dropped_frames_count);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::Module {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Module");
        debug_struct.field("module", &self.module);
        debug_struct.field("build_id", &self.build_id);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::TruncatableString {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("TruncatableString");
        debug_struct.field("value", &self.value);
        debug_struct.field("truncated_byte_count", &self.truncated_byte_count);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::BatchWriteSpansRequest {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("BatchWriteSpansRequest");
        debug_struct.field("name", &self.name);
        debug_struct.field("spans", &self.spans);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}
